import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dk_form/flutter_dk_form.dart';

class MultiLineInputDemoPage extends StatelessWidget {
  static const String routeName = '/page/multi_line_input_demo';
  static const String name = "MultiLineInputDemoPage";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("MultiLineInputDemoPage"),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Text('可输入多字折行'),
            MultiLineInputWidget(
              title: '标题',
              hintText: '内容提示',
              onChanged: (text){
                print(text);
              },
            ),
            Text('可输入多字折行最多两行'),
            MultiLineInputWidget(
              title: '标题',
              hintText: '内容提示',
              onChanged: (text){
                print(text);
              },
              maxLines: 2,
            ),
            Text('可输入多字折行默认内容'),
            MultiLineInputWidget(
              title: '标题',
              hintText: '内容提示',
              onChanged: (text){
                print(text);
              },
              maxLines: 2,
              initialValue:
              '我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框，我是多行输入框',
            ),
          ],
        ),
      ),
    );
  }
}
